curl --request PATCH \
--url https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "John Smith",
"email": "jsmith@example.com",
"new_id": "<string>",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"tags": {},
"devices": [
{
"device_token": "<string>",
"device_info": {
"model": "<string>",
"osVersion": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"consent": {
"email": false,
"push_notifications": false,
"in_app_messages": false,
"phone_calls": false,
"sms": false,
"whatsapp": false
},
"metadata": {}
}
'import requests
url = "https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous"
payload = {
"name": "John Smith",
"email": "jsmith@example.com",
"new_id": "<string>",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"tags": {},
"devices": [
{
"device_token": "<string>",
"device_info": {
"model": "<string>",
"osVersion": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"consent": {
"email": False,
"push_notifications": False,
"in_app_messages": False,
"phone_calls": False,
"sms": False,
"whatsapp": False
},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Smith',
email: 'jsmith@example.com',
new_id: '<string>',
dob: '2023-11-07T05:31:56Z',
document_type: '<string>',
document_number: '<string>',
country: '<string>',
phone: '+593 99 123 4567',
tags: {},
devices: [
{
device_token: '<string>',
device_info: {model: '<string>', osVersion: '<string>'},
expires_at: '2023-11-07T05:31:56Z',
created_at: '2023-11-07T05:31:56Z'
}
],
consent: {
email: false,
push_notifications: false,
in_app_messages: false,
phone_calls: false,
sms: false,
whatsapp: false
},
metadata: {}
})
};
fetch('https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Smith',
'email' => 'jsmith@example.com',
'new_id' => '<string>',
'dob' => '2023-11-07T05:31:56Z',
'document_type' => '<string>',
'document_number' => '<string>',
'country' => '<string>',
'phone' => '+593 99 123 4567',
'tags' => [
],
'devices' => [
[
'device_token' => '<string>',
'device_info' => [
'model' => '<string>',
'osVersion' => '<string>'
],
'expires_at' => '2023-11-07T05:31:56Z',
'created_at' => '2023-11-07T05:31:56Z'
]
],
'consent' => [
'email' => false,
'push_notifications' => false,
'in_app_messages' => false,
'phone_calls' => false,
'sms' => false,
'whatsapp' => false
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous"
payload := strings.NewReader("{\n \"name\": \"John Smith\",\n \"email\": \"jsmith@example.com\",\n \"new_id\": \"<string>\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"tags\": {},\n \"devices\": [\n {\n \"device_token\": \"<string>\",\n \"device_info\": {\n \"model\": \"<string>\",\n \"osVersion\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"consent\": {\n \"email\": false,\n \"push_notifications\": false,\n \"in_app_messages\": false,\n \"phone_calls\": false,\n \"sms\": false,\n \"whatsapp\": false\n },\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Smith\",\n \"email\": \"jsmith@example.com\",\n \"new_id\": \"<string>\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"tags\": {},\n \"devices\": [\n {\n \"device_token\": \"<string>\",\n \"device_info\": {\n \"model\": \"<string>\",\n \"osVersion\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"consent\": {\n \"email\": false,\n \"push_notifications\": false,\n \"in_app_messages\": false,\n \"phone_calls\": false,\n \"sms\": false,\n \"whatsapp\": false\n },\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Smith\",\n \"email\": \"jsmith@example.com\",\n \"new_id\": \"<string>\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"tags\": {},\n \"devices\": [\n {\n \"device_token\": \"<string>\",\n \"device_info\": {\n \"model\": \"<string>\",\n \"osVersion\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"consent\": {\n \"email\": false,\n \"push_notifications\": false,\n \"in_app_messages\": false,\n \"phone_calls\": false,\n \"sms\": false,\n \"whatsapp\": false\n },\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "<string>",
"name": "John Smith",
"registration_date": "2023-11-07T05:31:56Z",
"is_anonymous": false,
"email": "jsmith@example.com",
"email_verified": false,
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"phone_verified": false,
"devices": [
{
"id": "<string>",
"fcm_token": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"delivery_addresses": [
{
"alias": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"reference": "<string>",
"latitude": 0,
"longitude": 0,
"instructions": "<string>",
"preferred": false,
"metadata": {}
}
],
"billing_profiles": [
{
"alias": "<string>",
"legal_name": "<string>",
"address_line1": "<string>",
"tax_id": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"preferred": false,
"metadata": {}
}
],
"consent": {
"email": false,
"push_notifications": false,
"in_app_messages": false,
"phone_calls": false,
"sms": false,
"whatsapp": false
},
"metadata": {}
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Identify anonymous customers
Identify an anonymous customer by providing their real information. This endpoint converts an anonymous customer to a regular customer. The customer must have been created with is_anonymous: true. Optionally, you can provide a new_id to change the customer’s ID during identification.
curl --request PATCH \
--url https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "John Smith",
"email": "jsmith@example.com",
"new_id": "<string>",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"tags": {},
"devices": [
{
"device_token": "<string>",
"device_info": {
"model": "<string>",
"osVersion": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"consent": {
"email": false,
"push_notifications": false,
"in_app_messages": false,
"phone_calls": false,
"sms": false,
"whatsapp": false
},
"metadata": {}
}
'import requests
url = "https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous"
payload = {
"name": "John Smith",
"email": "jsmith@example.com",
"new_id": "<string>",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"tags": {},
"devices": [
{
"device_token": "<string>",
"device_info": {
"model": "<string>",
"osVersion": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"consent": {
"email": False,
"push_notifications": False,
"in_app_messages": False,
"phone_calls": False,
"sms": False,
"whatsapp": False
},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Smith',
email: 'jsmith@example.com',
new_id: '<string>',
dob: '2023-11-07T05:31:56Z',
document_type: '<string>',
document_number: '<string>',
country: '<string>',
phone: '+593 99 123 4567',
tags: {},
devices: [
{
device_token: '<string>',
device_info: {model: '<string>', osVersion: '<string>'},
expires_at: '2023-11-07T05:31:56Z',
created_at: '2023-11-07T05:31:56Z'
}
],
consent: {
email: false,
push_notifications: false,
in_app_messages: false,
phone_calls: false,
sms: false,
whatsapp: false
},
metadata: {}
})
};
fetch('https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Smith',
'email' => 'jsmith@example.com',
'new_id' => '<string>',
'dob' => '2023-11-07T05:31:56Z',
'document_type' => '<string>',
'document_number' => '<string>',
'country' => '<string>',
'phone' => '+593 99 123 4567',
'tags' => [
],
'devices' => [
[
'device_token' => '<string>',
'device_info' => [
'model' => '<string>',
'osVersion' => '<string>'
],
'expires_at' => '2023-11-07T05:31:56Z',
'created_at' => '2023-11-07T05:31:56Z'
]
],
'consent' => [
'email' => false,
'push_notifications' => false,
'in_app_messages' => false,
'phone_calls' => false,
'sms' => false,
'whatsapp' => false
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous"
payload := strings.NewReader("{\n \"name\": \"John Smith\",\n \"email\": \"jsmith@example.com\",\n \"new_id\": \"<string>\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"tags\": {},\n \"devices\": [\n {\n \"device_token\": \"<string>\",\n \"device_info\": {\n \"model\": \"<string>\",\n \"osVersion\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"consent\": {\n \"email\": false,\n \"push_notifications\": false,\n \"in_app_messages\": false,\n \"phone_calls\": false,\n \"sms\": false,\n \"whatsapp\": false\n },\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Smith\",\n \"email\": \"jsmith@example.com\",\n \"new_id\": \"<string>\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"tags\": {},\n \"devices\": [\n {\n \"device_token\": \"<string>\",\n \"device_info\": {\n \"model\": \"<string>\",\n \"osVersion\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"consent\": {\n \"email\": false,\n \"push_notifications\": false,\n \"in_app_messages\": false,\n \"phone_calls\": false,\n \"sms\": false,\n \"whatsapp\": false\n },\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://firespark.cloud/api/storefront/v1/customers/{id}/identify/anonymous")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Smith\",\n \"email\": \"jsmith@example.com\",\n \"new_id\": \"<string>\",\n \"dob\": \"2023-11-07T05:31:56Z\",\n \"document_type\": \"<string>\",\n \"document_number\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"+593 99 123 4567\",\n \"tags\": {},\n \"devices\": [\n {\n \"device_token\": \"<string>\",\n \"device_info\": {\n \"model\": \"<string>\",\n \"osVersion\": \"<string>\"\n },\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"consent\": {\n \"email\": false,\n \"push_notifications\": false,\n \"in_app_messages\": false,\n \"phone_calls\": false,\n \"sms\": false,\n \"whatsapp\": false\n },\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "<string>",
"name": "John Smith",
"registration_date": "2023-11-07T05:31:56Z",
"is_anonymous": false,
"email": "jsmith@example.com",
"email_verified": false,
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"phone": "+593 99 123 4567",
"phone_verified": false,
"devices": [
{
"id": "<string>",
"fcm_token": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"delivery_addresses": [
{
"alias": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"reference": "<string>",
"latitude": 0,
"longitude": 0,
"instructions": "<string>",
"preferred": false,
"metadata": {}
}
],
"billing_profiles": [
{
"alias": "<string>",
"legal_name": "<string>",
"address_line1": "<string>",
"tax_id": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"preferred": false,
"metadata": {}
}
],
"consent": {
"email": false,
"push_notifications": false,
"in_app_messages": false,
"phone_calls": false,
"sms": false,
"whatsapp": false
},
"metadata": {}
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The current customer unique identifier (the anonymous ID)
Body
Schema for identifying an anonymous customer. Converts an anonymous customer to a regular customer with real information.
The full name of the customer
"John Smith"
The email of the customer
Optional new customer ID to replace the anonymous ID
The gender of the customer
MALE, FEMALE The date of birth of the customer
The document type of the customer. If provided, document_number is required.
The document number of the customer. If provided, document_type is required.
50The country of the customer
100The customer's phone number in international format. Required for WhatsApp delivery.
"+593 99 123 4567"
Include your conditions customer tags here
Customer devices for push notifications
Show child attributes
Show child attributes
The email status of the customer
VALID, BOUNCED, UNSUBSCRIBED, COMPLAINED The customer's consent preferences
Show child attributes
Show child attributes
The metadata of the customer
Response
Customer identified successfully
Customer profile returned by Storefront API endpoints. Omits internal fields such as birthday.
Show child attributes
Show child attributes